﻿function setSortWeight() {
    var nodeid = UrlParm.parm('nodeid');
    var sortval = $("#SortWeight").val();
    if (isNaN(sortval)) {
        alert("只能填数字"); return false;
    }
    var returntext = $.ajax({ type: "POST", url: 'Node_control.aspx', data: 'ac=ajax_set_sortvalue&nodeid=' + nodeid + '&sortval=' + sortval, async: false }).responseText;
    var msg = eval("msg=" + returntext);
    if (msg.result == "1") {
        alert("排序设置成功");
        top.leftwin.location.reload(true);
        parent.close_dialog();
    }
    else {
        alert("排序设置失败");
        parent.close_dialog();
    }
}
function bind() {
    $("#btclose").click(function() {
        parent.close_dialog();
    });
    $("#btok").click(function() {
        setSortWeight();
    });
}
$(document).ready(function() {
    bind();
});